/*
 * SafeNativeMethods.cs
 *
 * Contains Safe P/Invoke Methods.
 *
 * Copyright (c) 2005, dnAnalytics. All rights reserved.
 */
using System.Runtime.InteropServices;
using System.Security;

namespace dnAnalytics.Nli.AtlasClapack {
	[SuppressUnmanagedCodeSecurity]
	internal sealed class SafeNativeMethods {

		private const string dllName = "atlas.dll" ;
		
		private SafeNativeMethods() {}

		#region PInvoke calls

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern float cblas_sdot(int n, [In] float[] x, int incX, [In] float[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern double cblas_ddot(int n, [In] double[] x, int incX, [In] double[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern double cblas_dsdot(int n, [In] float[] x, int incX, [In] float[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern float cblas_sdsdot(int n, float sb, [In] float[] x, int incX, [In] float[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_cdotu_sub(int n, [In] ComplexFloat[] x, int incX, [In] ComplexFloat[] y, int incY, ref ComplexFloat dotu);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_cdotc_sub(int n, [In] ComplexFloat[] x, int incX, [In] ComplexFloat[] y, int incY, ref ComplexFloat dotc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zdotu_sub(int n, [In] ComplexDouble[] x, int incX, [In] ComplexDouble[] y, int incY, ref ComplexDouble dotu);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zdotc_sub(int n, [In] ComplexDouble[] x, int incX, [In] ComplexDouble[] y, int incY, ref ComplexDouble dotc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern float cblas_snrm2(int n, [In] float[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern float cblas_sasum(int n, [In] float[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern double cblas_dnrm2(int n, [In] double[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern double cblas_dasum(int n, [In] double[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern float cblas_scnrm2(int n, [In] ComplexFloat[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern float cblas_scasum(int n, [In] ComplexFloat[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern double cblas_dznrm2(int n, [In] ComplexDouble[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern double cblas_dzasum(int n, [In] ComplexDouble[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int cblas_isamax(int n, [In] float[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int cblas_idamax(int n, [In] double[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int cblas_icamax(int n, [In] ComplexFloat[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int cblas_izamax(int n, [In] ComplexDouble[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_sswap(int n, [In, Out] float[] x, int incX, [In, Out] float[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_scopy(int n, [In] float[] x, int incX, [In, Out] float[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_saxpy(int n, float alpha, [In] float[] x, int incX, [In, Out] float[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_srotg(ref float a, ref float b, out float c, out float s);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dswap(int n, [In, Out] double[] x, int incX, [In, Out] double[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dcopy(int n, [In] double[] x, int incX, [In, Out] double[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_daxpy(int n, double alpha, [In] double[] x, int incX, [In, Out] double[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_drotg(ref double a, ref double b, out double c, out double s);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_cswap(int n, [In, Out] ComplexFloat[] x, int incX, [In, Out] ComplexFloat[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ccopy(int n, [In] ComplexFloat[] x, int incX, [In, Out] ComplexFloat[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_caxpy(int n, ref ComplexFloat alpha, [In] ComplexFloat[] x, int incX, [In, Out] ComplexFloat[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_crotg(ref ComplexFloat a, ref ComplexFloat b, out ComplexFloat c, out ComplexFloat s);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zswap(int n, [In, Out] ComplexDouble[] x, int incX, [In, Out] ComplexDouble[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zcopy(int n, [In] ComplexDouble[] x, int incX, [In, Out] ComplexDouble[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zaxpy(int n, ref ComplexDouble alpha, [In] ComplexDouble[] x, int incX, [In, Out] ComplexDouble[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zrotg(ref ComplexDouble a, ref ComplexDouble b, out ComplexDouble c, out ComplexDouble s);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_srotmg(ref float d1, ref float d2, ref float x1, float y1, [In, Out] float[] p);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_srot(int n, float[] x, int incX, float[] y, int incY, float c, float s);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_srotm(int n, [In, Out] float[] x, int incX, [In, Out] float[] y, int incY, [In, Out] float[] p);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_drotmg(ref double d1, ref double d2, ref double x1, double y1, [In, Out] double[] p);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_drot(int n, [In, Out] double[] x, int incX, [In, Out] double[] y, int incY, double c, double s);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_drotm(int n, [In, Out] double[] x, int incX, [In, Out] double[] y, int incY, [In, Out] double[] p);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_csrot(int n, [In, Out] ComplexFloat[] x, int incX, [In, Out] ComplexFloat[] y, int incY, float c, float s);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zdrot(int n, [In, Out] ComplexDouble[] x, int incX, [In, Out] ComplexDouble[] y, int incY, double c, double s);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_sscal(int n, float alpha, [In, Out] float[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dscal(int n, double alpha, [In, Out] double[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_cscal(int n, ref ComplexFloat alpha, [In, Out] ComplexFloat[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zscal(int n, ref ComplexDouble alpha, [In, Out] ComplexDouble[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_csscal(int n, float alpha, [In, Out] ComplexFloat[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zdscal(int n, double alpha, [In, Out] ComplexDouble[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_sgemv(BlasOrderType order, BlasTransType transA, int m, int n, float alpha, [In] float[] a, int lda, [In] float[] x, int incX, float beta, [In, Out] float[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_sgbmv(BlasOrderType order, BlasTransType transA, int m, int n, int kl, int ku, float alpha, [In] float[] a, int lda, [In] float[] x, int incX, float beta, [In, Out] float[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_strmv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, [In] float[] a, int lda, [In, Out] float[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_stbmv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, int k, [In] float[] a, int lda, [In, Out] float[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_stpmv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, [In] float[] ap, [In, Out] float[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_strsv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, [In] float[] a, int lda, [In, Out] float[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_stbsv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, int k, [In] float[] a, int lda, [In, Out] float[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_stpsv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, [In] float[] ap, [In, Out] float[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dgemv(BlasOrderType order, BlasTransType transA, int m, int n, double alpha, [In] double[] a, int lda, [In] double[] x, int incX, double beta, [In, Out] double[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dgbmv(BlasOrderType order, BlasTransType transA, int m, int n, int kl, int ku, double alpha, [In] double[] a, int lda, [In] double[] x, int incX, double beta, [In, Out] double[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dtrmv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, [In] double[] a, int lda, [In, Out] double[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dtbmv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, int k, [In] double[] a, int lda, [In, Out] double[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dtpmv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, [In] double[] ap, [In, Out] double[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dtrsv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, [In] double[] a, int lda, [In, Out] double[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dtbsv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, int k, [In] double[] a, int lda, [In, Out] double[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dtpsv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, [In] double[] ap, [In, Out] double[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_cgemv(BlasOrderType order, BlasTransType transA, int m, int n, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, [In] ComplexFloat[] x, int incX, ref ComplexFloat beta, [In, Out] ComplexFloat[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_cgbmv(BlasOrderType order, BlasTransType transA, int m, int n, int kl, int ku, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, [In] ComplexFloat[] x, int incX, ref ComplexFloat beta, [In, Out] ComplexFloat[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ctrmv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, [In] ComplexFloat[] a, int lda, [In, Out] ComplexFloat[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ctbmv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, int k, [In] ComplexFloat[] a, int lda, [In, Out] ComplexFloat[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ctpmv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, [In] ComplexFloat[] ap, [In, Out] ComplexFloat[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ctrsv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, [In] ComplexFloat[] a, int lda, [In, Out] ComplexFloat[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ctbsv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, int k, [In] ComplexFloat[] a, int lda, [In, Out] ComplexFloat[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ctpsv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, [In] ComplexFloat[] ap, [In, Out] ComplexFloat[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zgemv(BlasOrderType order, BlasTransType transA, int m, int n, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, [In] ComplexDouble[] x, int incX, ref ComplexDouble beta, [In, Out] ComplexDouble[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zgbmv(BlasOrderType order, BlasTransType transA, int m, int n, int kl, int ku, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, [In] ComplexDouble[] x, int incX, ref ComplexDouble beta, [In, Out] ComplexDouble[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ztrmv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, [In] ComplexDouble[] a, int lda, [In, Out] ComplexDouble[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ztbmv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, int k, [In] ComplexDouble[] a, int lda, [In, Out] ComplexDouble[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ztpmv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, [In] ComplexDouble[] ap, [In, Out] ComplexDouble[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ztrsv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, [In] ComplexDouble[] a, int lda, [In, Out] ComplexDouble[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ztbsv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, int k, [In] ComplexDouble[] a, int lda, [In, Out] ComplexDouble[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ztpsv(BlasOrderType order, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int n, [In] ComplexDouble[] ap, [In, Out] ComplexDouble[] x, int incX);


		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ssymv(BlasOrderType order, BlasUpLoType uplo, int n, float alpha, [In] float[] a, int lda, [In] float[] x, int incX, float beta, [In, Out] float[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ssbmv(BlasOrderType order, BlasUpLoType uplo, int n, int k, float alpha, [In] float[] a, int lda, [In] float[] x, int incX, float beta, [In, Out] float[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_sspmv(BlasOrderType order, BlasUpLoType uplo, int n, float alpha, [In] float[] ap, [In] float[] x, int incX, float beta, [In, Out] float[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_sger(BlasOrderType order, int m, int n, float alpha, [In] float[] x, int incX, [In] float[] y, int incY, [In, Out] float[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ssyr(BlasOrderType order, BlasUpLoType uplo, int n, float alpha, [In] float[] x, int incX, [In, Out] float[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_sspr(BlasOrderType order, BlasUpLoType uplo, int n, float alpha, [In] float[] x, int incX, [In, Out] float[] ap);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ssyr2(BlasOrderType order, BlasUpLoType uplo, int n, float alpha, [In] float[] x, int incX, [In] float[] y, int incY, [In, Out] float[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_sspr2(BlasOrderType order, BlasUpLoType uplo, int n, float alpha, [In] float[] x, int incX, [In] float[] y, int incY, [In, Out] float[] a);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dsymv(BlasOrderType order, BlasUpLoType uplo, int n, double alpha, [In] double[] a, int lda, double[] x, int incX, double beta, [In, Out] double[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dsbmv(BlasOrderType order, BlasUpLoType uplo, int n, int k, double alpha, [In] double[] a, int lda, [In] double[] x, int incX, double beta, [In, Out] double[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dspmv(BlasOrderType order, BlasUpLoType uplo, int n, double alpha, [In] double[] ap, [In] double[] x, int incX, double beta, [In, Out] double[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dger(BlasOrderType order, int m, int n, double alpha, [In] double[] x, int incX, [In] double[] y, int incY, [In, Out] double[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dsyr(BlasOrderType order, BlasUpLoType uplo, int n, double alpha, [In] double[] x, int incX, [In, Out] double[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dspr(BlasOrderType order, BlasUpLoType uplo, int n, double alpha, [In] double[] x, int incX, [In, Out] double[] ap);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dsyr2(BlasOrderType order, BlasUpLoType uplo, int n, double alpha, [In] double[] x, int incX, [In] double[] y, int incY, [In, Out] double[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dspr2(BlasOrderType order, BlasUpLoType uplo, int n, double alpha, [In] double[] x, int incX, [In] double[] y, int incY, [In, Out] double[] a);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_chemv(BlasOrderType order, BlasUpLoType uplo, int n, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, [In] ComplexFloat[] x, int incX, ref ComplexFloat beta, [In, Out] ComplexFloat[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_chbmv(BlasOrderType order, BlasUpLoType uplo, int n, int k, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, [In] ComplexFloat[] x, int incX, ref ComplexFloat beta, [In, Out] ComplexFloat[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_chpmv(BlasOrderType order, BlasUpLoType uplo, int n, ref ComplexFloat alpha, [In] ComplexFloat[] ap, [In] ComplexFloat[] x, int incX, ref ComplexFloat beta, [In, Out] ComplexFloat[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_cgeru(BlasOrderType order, int m, int n, ref ComplexFloat alpha, [In] ComplexFloat[] x, int incX, [In] ComplexFloat[] y, int incY, [In, Out] ComplexFloat[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_cgerc(BlasOrderType order, int m, int n, ref ComplexFloat alpha, [In] ComplexFloat[] x, int incX, [In] ComplexFloat[] y, int incY, [In, Out] ComplexFloat[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_cher(BlasOrderType order, BlasUpLoType uplo, int n, float alpha, [In] ComplexFloat[] x, int incX, [In, Out] ComplexFloat[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_chpr(BlasOrderType order, BlasUpLoType uplo, int n, float alpha, [In] ComplexFloat[] x, int incX, [In, Out] ComplexFloat[] a);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_cher2(BlasOrderType order, BlasUpLoType uplo, int n, ref ComplexFloat alpha, [In] ComplexFloat[] x, int incX, [In] ComplexFloat[] y, int incY, [In, Out] ComplexFloat[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_chpr2(BlasOrderType order, BlasUpLoType uplo, int n, ref ComplexFloat alpha, [In] ComplexFloat[] x, int incX, [In] ComplexFloat[] y, int incY, [In, Out] ComplexFloat[] ap);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zhemv(BlasOrderType order, BlasUpLoType uplo, int n, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, [In] ComplexDouble[] x, int incX, ref ComplexDouble beta, [In, Out] ComplexDouble[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zhbmv(BlasOrderType order, BlasUpLoType uplo, int n, int k, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, [In] ComplexDouble[] x, int incX, ref ComplexDouble beta, [In, Out] ComplexDouble[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zhpmv(BlasOrderType order, BlasUpLoType uplo, int n, ref ComplexDouble alpha, [In] ComplexDouble[] ap, [In] ComplexDouble[] x, int incX, ref ComplexDouble beta, [In, Out] ComplexDouble[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zgeru(BlasOrderType order, int m, int n, ref ComplexDouble alpha, [In] ComplexDouble[] x, int incX, [In] ComplexDouble[] y, int incY, [In, Out] ComplexDouble[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zgerc(BlasOrderType order, int m, int n, ref ComplexDouble alpha, [In] ComplexDouble[] x, int incX, [In] ComplexDouble[] y, int incY, [In, Out] ComplexDouble[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zher(BlasOrderType order, BlasUpLoType uplo, int n, double alpha, [In] ComplexDouble[] x, int incX, [In, Out] ComplexDouble[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zhpr(BlasOrderType order, BlasUpLoType uplo, int n, double alpha, [In] ComplexDouble[] x, int incX, [In, Out] ComplexDouble[] a);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zher2(BlasOrderType order, BlasUpLoType uplo, int n, ref ComplexDouble alpha, [In] ComplexDouble[] x, int incX, [In] ComplexDouble[] y, int incY, [In, Out] ComplexDouble[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zhpr2(BlasOrderType order, BlasUpLoType uplo, int n, ref ComplexDouble alpha, [In] ComplexDouble[] x, int incX, [In] ComplexDouble[] y, int incY, [In, Out] ComplexDouble[] ap);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_sgemm(BlasOrderType order, BlasTransType transA, BlasTransType transB, int m, int n, int k, float alpha, [In] float[] a, int lda, [In] float[] b, int ldb, float beta, [In, Out] float[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ssymm(BlasOrderType order, BlasSideType side, BlasUpLoType uplo, int m, int n, float alpha, [In] float[] a, int lda, [In] float[] b, int ldb, float beta, [In, Out] float[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ssyrk(BlasOrderType order, BlasUpLoType uplo, BlasTransType trans, int n, int k, float alpha, [In] float[] a, int lda, float beta, [In, Out] float[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ssyr2k(BlasOrderType order, BlasUpLoType uplo, BlasTransType trans, int n, int k, float alpha, [In] float[] a, int lda, [In] float[] b, int ldb, float beta, [In, Out] float[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_strmm(BlasOrderType order, BlasSideType side, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int m, int n, float alpha, [In] float[] a, int lda, [In, Out] float[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_strsm(BlasOrderType order, BlasSideType side, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int m, int n, float alpha, [In] float[] a, int lda, [In, Out] float[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dgemm(BlasOrderType order, BlasTransType transA, BlasTransType transB, int m, int n, int k, double alpha, [In] double[] a, int lda, [In] double[] b, int ldb, double beta, [In, Out] double[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dsymm(BlasOrderType order, BlasSideType side, BlasUpLoType uplo, int m, int n, double alpha, [In] double[] a, int lda, [In] double[] b, int ldb, double beta, [In, Out] double[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dsyrk(BlasOrderType order, BlasUpLoType uplo, BlasTransType trans, int n, int k, double alpha, [In] double[] a, int lda, double beta, [In, Out] double[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dsyr2k(BlasOrderType order, BlasUpLoType uplo, BlasTransType trans, int n, int k, double alpha, [In] double[] a, int lda, [In] double[] b, int ldb, double beta, [In, Out] double[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dtrmm(BlasOrderType order, BlasSideType side, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int m, int n, double alpha, [In] double[] a, int lda, [In, Out] double[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_dtrsm(BlasOrderType order, BlasSideType side, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int m, int n, double alpha, [In] double[] a, int lda, [In, Out] double[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_cgemm(BlasOrderType order, BlasTransType transA, BlasTransType transB, int m, int n, int k, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, [In] ComplexFloat[] b, int ldb, ref ComplexFloat beta, [In, Out] ComplexFloat[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_csymm(BlasOrderType order, BlasSideType side, BlasUpLoType uplo, int m, int n, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, [In] ComplexFloat[] b, int ldb, ref ComplexFloat beta, [In, Out] ComplexFloat[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_csyrk(BlasOrderType order, BlasUpLoType uplo, BlasTransType trans, int n, int k, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, ref ComplexFloat beta, [In, Out] ComplexFloat[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_csyr2k(BlasOrderType order, BlasUpLoType uplo, BlasTransType trans, int n, int k, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, [In] ComplexFloat[] b, int ldb, ref ComplexFloat beta, [In, Out] ComplexFloat[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ctrmm(BlasOrderType order, BlasSideType side, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int m, int n, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, [In, Out] ComplexFloat[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ctrsm(BlasOrderType order, BlasSideType side, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int m, int n, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, [In, Out] ComplexFloat[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zgemm(BlasOrderType order, BlasTransType transA, BlasTransType transB, int m, int n, int k, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, ComplexDouble[] b, int ldb, ref ComplexDouble beta, [In, Out] ComplexDouble[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zsymm(BlasOrderType order, BlasSideType side, BlasUpLoType uplo, int m, int n, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, [In] ComplexDouble[] b, int ldb, ref ComplexDouble beta, [In, Out] ComplexDouble[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zsyrk(BlasOrderType order, BlasUpLoType uplo, BlasTransType trans, int n, int k, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, ref ComplexDouble beta, [In, Out] ComplexDouble[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zsyr2k(BlasOrderType order, BlasUpLoType uplo, BlasTransType trans, int n, int k, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, [In] ComplexDouble[] b, int ldb, ref ComplexDouble beta, [In, Out] ComplexDouble[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ztrmm(BlasOrderType order, BlasSideType side, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int m, int n, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, [In, Out] ComplexDouble[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_ztrsm(BlasOrderType order, BlasSideType side, BlasUpLoType uplo, BlasTransType transA, BlasDiagType diag, int m, int n, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, [In, Out] ComplexDouble[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_chemm(BlasOrderType order, BlasSideType side, BlasUpLoType uplo, int m, int n, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, [In] ComplexFloat[] b, int ldb, ref ComplexFloat beta, [In, Out] ComplexFloat[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_cherk(BlasOrderType order, BlasUpLoType uplo, BlasTransType trans, int n, int k, float alpha, [In] ComplexFloat[] a, int lda, float beta, [In, Out] ComplexFloat[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_cher2k(BlasOrderType order, BlasUpLoType uplo, BlasTransType trans, int n, int k, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, [In] ComplexFloat[] b, int ldb, float beta, [In, Out] ComplexFloat[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zhemm(BlasOrderType order, BlasSideType side, BlasUpLoType uplo, int m, int n, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, [In] ComplexDouble[] b, int ldb, ref ComplexDouble beta, [In, Out] ComplexDouble[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zherk(BlasOrderType order, BlasUpLoType uplo, BlasTransType trans, int n, int k, double alpha, [In] ComplexDouble[] a, int lda, double beta, [In, Out] ComplexDouble[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cblas_zher2k(BlasOrderType order, BlasUpLoType uplo, BlasTransType trans, int n, int k, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, [In] ComplexDouble[] b, int ldb, double beta, [In, Out] ComplexDouble[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_dgetrf(BlasOrderType order, int m, int n, [In, Out] double[] a, int lda, [In, Out] int[] ipiv);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_sgetrf(BlasOrderType order, int m, int n, [In, Out] float[] a, int lda, [In, Out] int[] ipiv);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_sgetri(BlasOrderType order, int n, [In, Out] float[] a, int lda, [In] int[] ipiv, [In, Out] float[] work, int lwork);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_sgetrs(BlasOrderType order, BlasTransType trans, int n, int nrhs, [In] float[] a, int lda, [In] int[] ipiv, [In, Out] float[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_spotrf(BlasOrderType order, BlasUpLoType uplo, int n, [In, Out] float[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_spotri(BlasOrderType order, BlasUpLoType uplo, int n, [In, Out] float[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_spotrs(BlasOrderType order, BlasUpLoType uplo, int n, int nrhs, [In, Out] float[] a, int lda, [In, Out] float[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_dgetri(BlasOrderType order, int n, [In, Out] double[] a, int lda, [In] int[] ipiv, [In, Out] double[] work, int lwork);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_dgetrs(BlasOrderType order, BlasTransType trans, int n, int nrhs, [In] double[] a, int lda, [In] int[] ipiv, [In, Out] double[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_cgetrf(BlasOrderType order, int m, int n, [In, Out] ComplexFloat[] a, int lda, [In, Out] int[] ipiv);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_dpotrf(BlasOrderType order, BlasUpLoType uplo, int n, [In, Out] double[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_dpotri(BlasOrderType order, BlasUpLoType uplo, int n, [In, Out] double[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_dpotrs(BlasOrderType order, BlasUpLoType uplo, int n, int nrhs, [In, Out] double[] a, int lda, [In, Out] double[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_cgetri(BlasOrderType order, int n, [In, Out] ComplexFloat[] a, int lda, [In] int[] ipiv, [In, Out] ComplexFloat[] work, int lwork);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_cgetrs(BlasOrderType order, BlasTransType trans, int n, int nrhs, [In] ComplexFloat[] a, int lda, [In] int[] ipiv, [In, Out] ComplexFloat[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_cpotrf(BlasOrderType order, BlasUpLoType uplo, int n, [In, Out] ComplexFloat[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_cpotri(BlasOrderType order, BlasUpLoType uplo, int n, [In, Out] ComplexFloat[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_cpotrs(BlasOrderType order, BlasUpLoType uplo, int n, int nrhs, [In, Out] ComplexFloat[] a, int lda, [In, Out] ComplexFloat[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_zgetrf(BlasOrderType order, int m, int n, [In, Out] ComplexDouble[] a, int lda, [In, Out] int[] ipiv);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_zgetri(BlasOrderType order, int n, [In, Out] ComplexDouble[] a, int lda, [In] int[] ipiv, [In, Out] ComplexDouble[] work, int lwork);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_zgetrs(BlasOrderType order, BlasTransType trans, int n, int nrhs, [In] ComplexDouble[] a, int lda, [In] int[] ipiv, [In, Out] ComplexDouble[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_zpotrf(BlasOrderType order, BlasUpLoType uplo, int n, [In, Out] ComplexDouble[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_zpotri(BlasOrderType order, BlasUpLoType uplo, int n, [In, Out] ComplexDouble[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int clapack_zpotrs(BlasOrderType order, BlasUpLoType uplo, int n, int nrhs, [In, Out] ComplexDouble[] a, int lda, [In, Out] ComplexDouble[] b, int ldb);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int sgeqp3_(ref int m, ref int n, [In, Out] float[] a, ref int lda, [In, Out] int[] jpvt, [In, Out] float[] tau, [In, Out] float[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int sgesvd_(ref char jobu, ref char jobvt, ref int m, ref int n, [In, Out] float[] a, ref int lda, [In, Out] float[] s, [In, Out] float[] u, ref int ldu, [In, Out] float[] vt, ref int ldvt, [In, Out] float[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int sorgqr_(ref int m, ref int n, ref int k, [In, Out] float[] a, ref int lda, [In] float[] tau, [In, Out] float[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int sormqr_(ref char side, ref char trans, ref int m, ref int n, ref int k, [In] float[] a, ref int lda, [In] float[] tau, [In, Out] float[] c, ref int ldc, [In, Out] float[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int dgeqp3_(ref int m, ref int n, [In, Out] double[] a, ref int lda, [In, Out] int[] jpvt, [In, Out] double[] tau, [In, Out] double[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int dgesvd_(ref char jobu, ref char jobvt, ref int m, ref int n, [In, Out] double[] a, ref int lda, [In, Out] double[] s, [In, Out] double[] u, ref int ldu, [In, Out] double[] vt, ref int ldvt, [In, Out] double[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int dorgqr_(ref int m, ref int n, ref int k, [In, Out] double[] a, ref int lda, [In] double[] tau, [In, Out] double[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int dormqr_(ref char side, ref char trans, ref int m, ref int n, ref int k, [In] double[] a, ref int lda, [In] double[] tau, [In, Out] double[] c, ref int ldc, [In, Out] double[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int cgeqp3_(ref int m, ref int n, [In, Out] ComplexFloat[] a, ref int lda, [In, Out] int[] jpvt, [In, Out] ComplexFloat[] tau, [In, Out] ComplexFloat[] work, ref int lwork, [In, Out] float[] rwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int cungqr_(ref int m, ref int n, ref int k, [In, Out] ComplexFloat[] a, ref int lda, [In] ComplexFloat[] tau, [In, Out] ComplexFloat[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int cunmqr_(ref char side, ref char trans, ref int m, ref int n, ref int k, [In] ComplexFloat[] a, ref int lda, [In] ComplexFloat[] tau, [In, Out] ComplexFloat[] c, ref int ldc, [In, Out] ComplexFloat[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int zgeqp3_(ref int m, ref int n, [In, Out] ComplexDouble[] a, ref int lda, [In, Out] int[] jpvt, [In, Out] ComplexDouble[] tau, [In, Out] ComplexDouble[] work, ref int lwork, [In, Out] double[] rwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int zungqr_(ref int m, ref int n, ref int k, [In, Out] ComplexDouble[] a, ref int lda, [In] ComplexDouble[] tau, [In, Out] ComplexDouble[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int zunmqr_(ref char side, ref char trans, ref int m, ref int n, ref int k, [In] ComplexDouble[] a, ref int lda, [In] ComplexDouble[] tau, [In, Out] ComplexDouble[] c, ref int ldc, [In, Out] ComplexDouble[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int cgesvd_(ref char jobu, ref char jobvt, ref int m, ref int n, [In, Out] ComplexFloat[] a, ref int lda, [In, Out] float[] s, [In, Out] ComplexFloat[] u, ref int ldu, [In, Out] ComplexFloat[] v, ref int ldvt, [In, Out] ComplexFloat[] work, ref int lwork, [In, Out] float[] rwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int zgesvd_(ref char jobu, ref char jobvt, ref int m, ref int n, [In, Out] ComplexDouble[] a, ref int lda, [In, Out] double[] s, [In, Out] ComplexDouble[] u, ref int ldu, [In, Out] ComplexDouble[] v, ref int ldvt, [In, Out] ComplexDouble[] work, ref int lwork, [In, Out] double[] rwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int sgels_(ref char trans, ref int m, ref int n, ref int nrhs, [In, Out] float[] a, ref int lda, float[] b, ref int ldb, [In, Out] float[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int cgels_(ref char trans, ref int m, ref int n, ref int nrhs, [In, Out] ComplexFloat[] a, ref int lda, [In, Out] ComplexFloat[] b, ref int ldb, [In, Out] ComplexFloat[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int dgels_(ref char trans, ref int m, ref int n, ref int nrhs, [In, Out] double[] a, ref int lda, double[] b, ref int ldb, [In, Out] double[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int zgels_(ref char trans, ref int m, ref int n, ref int nrhs, [In, Out] ComplexDouble[] a, ref int lda, [In, Out] ComplexDouble[] b, ref int ldb, [In, Out] ComplexDouble[] work, ref int lwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int sgelss_(ref int m, ref int n, ref int nrhs, [In, Out] float[] a, ref int lda, [In, Out] float[] b, ref int ldb, [In, Out] float[] s, ref float rcond, ref int rank, [In, Out] float[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int dgelss_(ref int m, ref int n, ref int nrhs, [In, Out] double[] a, ref int lda, [In, Out] double[] b, ref int ldb, [In, Out] double[] s, ref double rcond, ref int rank, [In, Out] double[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int cgelss_(ref int m, ref int n, ref int nrhs, [In, Out] ComplexFloat[] a, ref int lda, [In, Out] ComplexFloat[] b, ref int ldb, [In, Out] float[] s, ref float rcond, ref int rank, [In, Out] ComplexFloat[] work, ref int lwork, [In, Out] float[] rwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int zgelss_(ref int m, ref int n, ref int nrhs, [In, Out] ComplexDouble[] a, ref int lda, [In, Out] ComplexDouble[] b, ref int ldb, [In, Out] double[] s, ref double rcond, ref int rank, [In, Out] ComplexDouble[] work, ref int lwork, [In, Out] double[] rwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int sgelsy_(ref int m, ref int n, ref int nrhs, [In, Out] float[] a, ref int lda, [In, Out] float[] b, ref int ldb, [In, Out] int[] jpvt, ref float rcond, ref int rank, [In, Out] float[] work, ref int lwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int dgelsy_(ref int m, ref int n, ref int nrhs, [In, Out] double[] a, ref int lda, [In, Out] double[] b, ref int ldb, [In, Out] int[] jpvt, ref double rcond, ref int rank, [In, Out] double[] work, ref int lwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int cgelsy_(ref int m, ref int n, ref int nrhs, [In, Out] ComplexFloat[] a, ref int lda, [In, Out] ComplexFloat[] b, ref int ldb, [In, Out] int[] jpvt, ref float rcond, ref int rank, [In, Out] ComplexFloat[] work, ref int lwork, [In, Out] float[] rwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int zgelsy_(ref int m, ref int n, ref int nrhs, [In, Out] ComplexDouble[] a, ref int lda, [In, Out] ComplexDouble[] b, ref int ldb, [In, Out] int[] jpvt, ref double rcond, ref int rank, [In, Out] ComplexDouble[] work, ref int lwork, [In, Out] double[] rwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern float slange_(ref char norm, ref int m, ref int n, [In] float[] a, ref int lda, [In] float[] work);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern double dlange_(ref char norm, ref int m, ref int n, [In] double[] a, ref int lda, [In] double[] work);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern float clange_(ref char norm, ref int m, ref int n, [In] ComplexFloat[] a, ref int lda, float[] work);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern double zlange_(ref char norm, ref int m, ref int n, [In] ComplexDouble[] a, ref int lda, [In] double[] work);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int sgecon_(ref char norm, ref int n, [In] float[] a, ref int lda, ref float anorm, ref float rcond, [In] float[] work, [In] int[] iwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int dgecon_(ref char norm, ref int n, [In] double[] a, ref int lda, ref double anorm, ref double rcond, [In] double[] work, [In] int[] iwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int cgecon_(ref char norm, ref int n, [In] ComplexFloat[] a, ref int lda, ref float anorm, ref float rcond, [In] ComplexFloat[] work, [In] float[] rwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int zgecon_(ref char norm, ref int n, [In] ComplexDouble[] a, ref int lda, ref double anorm, ref double rcond, [In] ComplexDouble[] work, [In] double[] rwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int sggev_(ref char jobvl, ref char jobvr, ref int n, float[] a, ref int lda, float[] b, ref int ldb, float[] alphar, float[] alphai, float[] beta, float[] vl, ref int ldvl, float[] vr, ref int ldvr, float[] work, ref int lwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int ilaenv_(ref int ispec, string name, string opts, ref int n1, ref int n2, ref int n3, ref int n4, long name_len, long opts_len);
		#endregion PInvoke calls
	}
}